package org.lili.lambdaexp;

import org.lili.semanticmodel.Edge;
import org.lili.semanticmodel.Vertex;

/**
 * @author lili
 * @description ${DESCRIPTION}
 * @create 2018-04-22 下午3:53
 * @since
 **/
public class EdgeBuilder {
    private Edge edge;

    public EdgeBuilder() {
        edge = new Edge();
    }

    public Edge edge() {
        return edge;
    }

    public void from(String lbl) {
        edge.setFromVertex(new Vertex(lbl));
    }

    public void to(String lbl) {
        edge.setToVertex(new Vertex(lbl));
    }

    public void weight(Double w) {
        edge.setWeight(w);
    }
}
